From: Johannes Thumshirn Date: Thu, 9 Jul 2015 07:39:42 +0000 (+0200) Subject: cxl: Destroy afu->contexts_idr on release of an afu X-Git-Tag: archive/raspbian/4.9.13-1+rpi1~10^2~3852^2~96 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=bd664f892e3e2b01c79197cad3111d54b7aedf39;p=linux-4.9.git cxl: Destroy afu->contexts_idr on release of an afu Destroy afu->contexts_idr on release of an afu, reclaiming the allocated memory. Signed-off-by: Johannes Thumshirn Acked-by: Ian Munsie Signed-off-by: Michael Ellerman --- diff --git a/drivers/misc/cxl/pci.c b/drivers/misc/cxl/pci.c index eb05efb74eed..1d314f1f95fe 100644 --- a/drivers/misc/cxl/pci.c +++ b/drivers/misc/cxl/pci.c @@ -551,6 +551,7 @@ static void cxl_release_afu(struct device *dev) pr_devel("cxl_release_afu\n"); + idr_destroy(&afu->contexts_idr); kfree(afu); }